package de.mhus.lib.mandala.text;

import de.mhus.lib.mandala.Response;


public class Glyphicon extends Text {

	public enum GLYPHICON {	ASTERISK,PLUS,EURO,MINUS,CLOUD,ENVELOPE,PENCIL,GLASS,MUSIC,SEARCH,HEART,STAR,STAR_EMPTY,
							USER,FILM,TH_LARGE,TH,TH_LIST,OK,REMOVE,ZOOM_IN,ZOOM_OUT,OFF,SIGNAL,COG,TRASH,HOME,FILE,
							TIME,ROAD,DOWNLOAD_ALT,DOWNLOAD,UPLOAD,INBOX,PLAY_CIRCLE,REPEAT,REFRESH,LIST_ALT,LOCK,FLAG,
							HEADPHONES,VOLUME_OFF,VOLUME_DOWN,VOLUME_UP,QRCODE,BARCODE,TAG,TAGS,BOOK,BOOKMARK,PRINT,CAMERA,
							FONT,BOLD,ITALIC,TEXT_HEIGHT,TEXT_WIDTH,ALIGN_LEFT,ALIGN_CENTER,ALIGN_RIGHT,ALIGN_JUSTIFY,LIST,
							INDENT_LEFT,INDENT_RIGHT,FACETIME_VIDEO,PICTURE,MAP_MARKER,ADJUST,TINTEDIT,SHARE,CHECK,MOVE,
							STEP_BACKWARD,FAST_BACKWARD,BACKWARD,PLAY,PAUSE,STOP,FORWARD,FAST_FORWARD,STEP_FORWARD,EJECT,
							CHEVRON_LEFT,CHREVRON_RIGHT,PLUS_SIGN,MINUS_SIGN,REMOVE_SIGN,OK_SIGN,QUESTION_SIGN,INFO_SIGN,
							SCREENSHOT,REMOVE_CIRCLE,OK_CIRCLE,BAN_CIRCLE,ARROW_LEFT,ARROW_RIGHT,ARROW_UP,ARROW_DOWN,SHARE_ALT,
							RESIZE_FULL,RESIZE_SMALL,EXCLAMATION_SIGN,GIFT,LEAF,FIRE,EYE_OPEN,EYE_CLOSE,WARNING_SIGN,PLANE,
							CALENDAR, RANDOM, COMMENT, MAGNET, CHEVRON_UP, CHEVRON_DOWN, RETWEET, SHOPPING_CART,
							FOLDER_CLOSE, FOLDER_OPEN, RESIZE_VERTICAL, RESIZE_HORIZONTAL, HDD, BULLHORN, BELL, CERTIFICATE,
							THUMBS_UP, THUMBS_DOWN, HAND_RIGHT, HAND_LEFT, HAND_UP, HAND_DOWN, CIRCLE_ARROW_RIGHT, CIRCLE_ARROW_LEFT,
							CIRCLE_ARROW_UP, CIRCLE_ARROW_DOWN, GLOBE, WRENCH, TASKS, FILTER, BRIEFCASE, FULLSCREEN, DASHBOARD,
							PAPERCLIP, HEARD_EMPTY}
	// TODO fullfill...

	private GLYPHICON glyphicon;
	
	public Glyphicon(GLYPHICON glyphicon) {
		super(null);
		this.glyphicon = glyphicon;
	}

	public GLYPHICON getGlyphicon() {
		return glyphicon;
	}

	public void setGlyphicon(GLYPHICON glyphicon) {
		this.glyphicon = glyphicon;
	}

	@Override
	protected void doRender(Response response) {
		if (glyphicon == null) return;
		response.singleTag("span", "glyphicon " + getGlyphiconClass(), getTagAttributes());
	}

	public String getGlyphiconClass() {
		return glyphicon.toString().toLowerCase().replace('_', '-');
	}
	
}
